void InsertionSort(int *Array, int ArrayLength)
{
	int i, j, key;

	for (j = 1; j < ArrayLength; j++) {
		key = Array[j];
		//Start comparing elements occurring before the key with the key itself
		i = j - 1;
		//Compare until first index of the input array is reached or proper place of the key is found
		while ((i > -1) && (Array[i] > key)) {
            //Current element greater than key? Push it to the next location
			Array[i+1] = Array[i];
			i--;
		}
		//Insert key next to first such element which is smaller than the same
		//OR at the first index of the array.
		Array[i+1] = key;
	}
}
